#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2018, Intel Corporation
#
#
# pmempool_dump/TEST3 -- test for dump command
#

. ../unittest/unittest.sh

require_test_type medium

require_fs_type pmem non-pmem

setup

POOL=$DIR/file.pool
LOG=out${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

expect_normal_exit $PMEMPOOL$EXESUFFIX create blk 512 $POOL
expect_normal_exit $PMEMWRITE$EXESUFFIX $POOL 0:w:TEST0
expect_normal_exit $PMEMPOOL$EXESUFFIX dump -r-1 -o dump.log $POOL
cat dump.log | $GREP "^00000000" >> $LOG
expect_normal_exit $PMEMPOOL$EXESUFFIX dump -r0 $POOL | $GREP "^00000000" >> $LOG

check

pass
